<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>用户登陆</title>
	<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
	<link rel="stylesheet" href="#(path)/dist/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" href="#(path)/dist/css/AdminLTE.min.css">
</head>
<style type=text/css>
body {
	background: #fff url(#( path)/dist/img/bg.jpg) no-repeat left top;
	background-size: 100%;
}
</style>
<body>
	<div class="login-box">
		<div class="login-logo">
			<img src="#(path)/dist/img/logo.png" width=300px;>
		</div>
		<div class="login-box-body" style="border-radius: 10px;">
			#if(msg)
			<p class="login-box-msg" style="color: #930000">#(msg)</p>
			#end
				<div class="form-group has-feedback">
					<input type="text" id="phone" class="form-control"
						placeholder="账户"> <span
						class="glyphicon glyphicon-envelope form-control-feedback"></span>
				</div>
				<div class="form-group has-feedback">
					<input type="password"  id="password" class="form-control"
						placeholder="密码"> <span
						class="glyphicon glyphicon-lock form-control-feedback"></span>
				</div>
				<div class="form-group has-feedback">
					<button type="submit" class="submit btn btn-success btn-block btn-flat">开始登陆</button>
				</div>
			<!--  <button class="btn btn-primary btn-block btn-flat">我要注册</button>-->
		</div>
	</div>
	<script src="#(path)/dist/plugins/jQuery/jquery-2.2.3.min.js"></script>
	<script src="#(path)/dist/bootstrap/js/bootstrap.min.js"></script>
	<script src="#(path)/dist/js/elink.js"></script>
	<script src="#(path)/dist/plugins/layer/layer.js"></script>
	<script>
	$(function() {
			$('.submit').click(function(){
				ajax("#(path)/user/login",
						{"phone":$('#phone').val(),"password":$('#password').val()}, function(data){
					if(data.code=='ok'){
						layer.msg(data.msg, {time: 800, icon:1},function(){
							// 登陆成功，执行跳转...
							window.location.href="#(path)/client/mylist";
						});
					}else if(data.code=='error'){
						layer.msg(data.msg, {icon:2},function(){
							// 登陆失败，提醒错误...
						});
					}
				});
			});
	});
	</script>
</body>
</html>
